﻿using System.Collections.Generic;
using System.Configuration;
//
namespace PerceptiveMCAPI
{
   public class MCAPISettings : ConfigurationSection
   {

      private static MCAPISettings _instance;
      private static MCAPISettings Instance
      {
         get
         {
            if ( _instance == null )
            {
               _instance = ConfigurationManager.GetSection( "MailChimpAPIconfig" ) as MCAPISettings;
               if ( _instance == null ) _instance = new MCAPISettings();
            }
            return _instance;
         }
      }
      //-----------------------------------------------------------------
      [ConfigurationProperty( "MCAPI" )]
      internal MCAPIconfig MCAPI
      {
         get { return (MCAPIconfig)this["MCAPI"]; }
      }

      // --------------------------------------------- api directives 
      public static string api_URL
      {
         get
         {
            string baseUrl = "api.mailchimp.com";
            return string.Format( "{0}/{1}", baseUrl, api_Version );
         }
      }
      public static string api_Version
      {
         get { return "1.2"; }
      }
      public static string api_UserAgent
      {
         get
         {
            return "MailChimp.Net / 1.2";
         }
      }
      public static string api_DataCenter
      {
         get
         {
            return Instance.MCAPI.DataCenter;
         }
      }
      //
      public static bool api_xmlrpc_UseStringTag
      {
         get
         {
            bool bt; bool.TryParse( Instance.MCAPI.UseStringTag, out bt );
            return bt;
         }
      }
      public static int api_xmlrpc_Indentation
      {
         get
         {
            int it; int.TryParse( Instance.MCAPI.Indentation, out it );
            return it;
         }
      }
      public static bool api_xmlrpc_EnableCompression
      {
         get
         {
            bool bt; bool.TryParse( Instance.MCAPI.EnableCompression, out bt );
            return bt;
         }
      }

      public static int default_start { get { return 0; } }

      #region ---------------------------------------------------------------- Wrapper Control
 
      public static EnumValues.AccessType default_AccessType
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.AccessType>( Instance.MCAPI.AccessType );
         }
      }
      public static EnumValues.OutputType default_OutputType
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.OutputType>( Instance.MCAPI.OutputType );
         }
      }
      public static EnumValues.MethodType default_MethodType
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.MethodType>( Instance.MCAPI.MethodType );
         }
      }
      public static bool default_EncodeRequest
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.EncodeRequest, out tbool );
            return tbool;
         }
      }
      public static bool default_Validate
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.Validate, out tbool );
            return tbool;
         }
      }
      public static bool default_CustomErrorMessages
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.CustomErrorMessages, out tbool );
            return tbool;
         }
      }
      public static int default_Timeout
      {
         get
         {
            int it; int.TryParse( Instance.MCAPI.Timeout, out it );
            if ( it == 0 ) return 90000;  // default
            return it;
         }
      }
      public static bool default_SecureAccess
      {
         get
         {
            bool bt; bool.TryParse( Instance.MCAPI.SecureAccess, out bt );
            return bt;
         }
      }

      #endregion

      #region ----------------------------------------------------------- API, Security & Helper
      public static bool default_apikeys_expired
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.apikeys_expired, out tbool );
            return tbool;
         }
      }
      // ---------------------------------------------------------------- 
      public static bool default_inlineCss_strip_css
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.inlineCss_strip_css, out tbool );
            return tbool;
         }
      }
      public static EnumValues.generateText_type default_generateText_type
      {
         get { return apiHelper.GetEnumFromString<EnumValues.generateText_type>( Instance.MCAPI.generateText_type ); }
      }
      #endregion

      #region ---------------------------------------------------------------- API, Campaign Related
      public static bool default_campaignContent_for_archive
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaignContent_for_archive, out tbool );
            return tbool;
         }
      }

      public static EnumValues.campaign_type default_campaign_type
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.campaign_type>( Instance.MCAPI.campaign_type );
         }
      }
      public static bool default_campaign_tracking_opens
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_tracking_opens, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_tracking_html_clicks
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_tracking_html_clicks, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_tracking_text_clicks
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_tracking_text_clicks, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_authenticate
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_authenticate, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_inline_css
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_inline_css, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_generate_text
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_generate_text, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_auto_tweet
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_auto_tweet, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_timewarp
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_timewarp, out tbool );
            return tbool;
         }
      }
      public static bool default_campaign_ecomm360
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_ecomm360, out tbool );
            return tbool;
         }
      }

      public static bool default_campaign_auto_footer
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaign_auto_footer, out tbool );
            return tbool;
         }
      }
      // RSS
      public static EnumValues.campaign_Rss_Schedule default_campaign_rss_schedule
      {
         get { return apiHelper.GetEnumFromString<EnumValues.campaign_Rss_Schedule>( Instance.MCAPI.campaign_rss_schedule ); }
      }
      public static string default_campaign_rss_schedule_hour
      {
         get
         {
            return Instance.MCAPI.campaign_rss_schedule_hour;
         }
      }
      public static EnumValues.campaign_Rss_Weekday default_campaign_rss_schedule_weekday
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.campaign_Rss_Weekday>( Instance.MCAPI.campaign_rss_schedule_weekday );
         }
      }
      public static string default_campaign_rss_schedule_monthday
      {
         get
         {
            return Instance.MCAPI.campaign_rss_schedule_monthday;
         }
      }

      // A/B Split
      public static EnumValues.campaign_AB_pick_winner default_campaign_AB_pick_winner
      {
         get { return apiHelper.GetEnumFromString<EnumValues.campaign_AB_pick_winner>( Instance.MCAPI.campaign_AB_pick_winner ); }
      }
      public static EnumValues.campaign_AB_wait_units default_campaign_AB_wait_units
      {
         get { return apiHelper.GetEnumFromString<EnumValues.campaign_AB_wait_units>( Instance.MCAPI.campaign_AB_wait_units ); }
      }
      public static int default_campaign_AB_wait_time
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.campaign_AB_wait_time, out tempInt );
            return tempInt;
         }
      }
      public static int default_campaign_AB_split_size
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.campaign_AB_split_size, out tempInt );
            return tempInt;
         }
      }
      // campaignShareReport ----------
      public static string default_campaignShareReport_header_type
      {
         get
         {
            return Instance.MCAPI.campaignShareReport_header_type;
         }
      }
      public static string default_campaignShareReport_header_data
      {
         get
         {
            return Instance.MCAPI.campaignShareReport_header_data;
         }
      }
      public static bool default_campaignShareReport_secure
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.campaignShareReport_secure, out tbool );
            return tbool;
         }
      }
      public static string default_campaignShareReport_css_url
      {
         get
         {
            return Instance.MCAPI.campaignShareReport_css_url;
         }
      }
      //
      public static EnumValues.campaignSendTest_send_type default_campaignSendTest_send_type
      {
         get { return apiHelper.GetEnumFromString<EnumValues.campaignSendTest_send_type>( Instance.MCAPI.campaignSendTest_send_type ); }
      }

      #endregion

      // ---------------------------------------------------------------- API, Campaign Stats

      #region -------------------------------------------------------------- API, Lists
      public static EnumValues.emailType default_listSubscribe_email_type
      {
         get { return apiHelper.GetEnumFromString<EnumValues.emailType>( Instance.MCAPI.listSubscribe_email_type ); }
      }
      public static bool default_listSubscribe_double_optin
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listSubscribe_double_optin, out tbool );
            return tbool;
         }
      }
      public static bool default_listSubscribe_update_existing
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listSubscribe_update_existing, out tbool );
            return tbool;
         }
      }
      public static bool default_listSubscribe_replace_interests
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listSubscribe_replace_interests, out tbool );
            return tbool;
         }
      }
      public static bool default_listSubscribe_send_welcome
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listSubscribe_send_welcome, out tbool );
            return tbool;
         }
      }
      public static bool default_listUnsubscribe_delete_member
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listUnsubscribe_delete_member, out tbool );
            return tbool;
         }
      }
      public static bool default_listUnsubscribe_send_goodbye
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listUnsubscribe_send_goodbye, out tbool );
            return tbool;
         }
      }
      public static bool default_listUnsubscribe_send_notify
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listUnsubscribe_send_notify, out tbool );
            return tbool;
         }
      }
      public static EnumValues.listMembers_status default_listMembers_status
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.listMembers_status>( Instance.MCAPI.listMembers_status );
         }
      }
      #endregion

      #region ----------------------------------------------------------- MergeVarAdd/Update

      public static EnumValues.field_Type default_listMergeVarAdd_field_type
      {
         get
         {
            return apiHelper.GetEnumFromString<EnumValues.field_Type>( Instance.MCAPI.listMergeVarAdd_field_type );
         }
      }
      public static bool default_listMergeVarAdd_req
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listMergeVarAdd_req, out tbool );
            return tbool;
         }
      }
      public static bool default_listMergeVarAdd_public
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listMergeVarAdd_public, out tbool );
            return tbool;
         }
      }
      public static bool default_listMergeVarAdd_show
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listMergeVarAdd_show, out tbool );
            return tbool;
         }
      }
      #endregion
      #region -------------------------------------------------------- webhook
      // actions
      public static bool default_listWebhook_actions_subscribe
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_actions_subscribe, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_actions_unsubscribe
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_actions_unsubscribe, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_actions_profile
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_actions_profile, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_actions_cleaned
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_actions_cleaned, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_actions_upemail
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_actions_upemail, out tbool );
            return tbool;
         }
      }
      // sources
      public static bool default_listWebhook_sources_user
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_sources_user, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_sources_admin
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_sources_admin, out tbool );
            return tbool;
         }
      }
      public static bool default_listWebhook_sources_api
      {
         get
         {
            bool tbool; bool.TryParse( Instance.MCAPI.listWebhook_sources_api, out tbool );
            return tbool;
         }
      }
      #endregion
      // ---------------------------------------------------------------- API, General
      public static string default_apikey
      {
         get
         {
            return Instance.MCAPI.apikey;
         }
      }

      #region ----------------------------------------------------------- Default Limits
      // Lists
      public static int default_limit_listAbuseReports
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_listAbuseReports, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_listMembers
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_listMembers, out tempInt );
            return tempInt;
         }
      }
      // Campaigns & Stats
      public static int default_limit_campaigns
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaigns, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignAbuseReports
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignAbuseReports, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignBounceMessages
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignBounceMessages, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignEcommOrders
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignEcommOrders, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignHardBounces
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignHardBounces, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignSoftBounces
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignSoftBounces, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignUnsubscribes
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignUnsubscribes, out tempInt );
            return tempInt;
         }
      }
      // AIM
      public static int default_limit_campaignClickDetailAIM
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignClickDetailAIM, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignEmailStatsAIMAll
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignEmailStatsAIMAll, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignNotOpenedAIM
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignNotOpenedAIM, out tempInt );
            return tempInt;
         }
      }
      public static int default_limit_campaignOpenedAIM
      {
         get
         {
            int tempInt; int.TryParse( Instance.MCAPI.limit_campaignOpenedAIM, out tempInt );
            return tempInt;
         }
      }
      // ---------------------------------------------------------------- max values
      // Lists
      public static int max_listAbuseReports { get { return 1000; } }
      public static int max_listMembers { get { return 15000; } }
      // Campaigns & Stats
      public static int max_campaigns { get { return 1000; } }
      public static int max_campaignAbuseReports { get { return 1000; } }
      public static int max_campaignBounceMessages { get { return 50; } }
      public static int max_campaignEcommOrders { get { return 500; } }
      public static int max_campaignHardBounces { get { return 15000; } }
      public static int max_campaignSoftBounces { get { return 15000; } }
      public static int max_campaignUnsubscribes { get { return 15000; } }
      // AIM
      public static int max_campaignClickDetailAIM { get { return 15000; } }
      public static int max_campaignEmailStatsAIMAll { get { return 1000; } }
      public static int max_campaignNotOpenedAIM { get { return 15000; } }
      public static int max_campaignOpenedAIM { get { return 15000; } }

      #endregion

      #region ============================================================ Settings Display
      public static Dictionary<string, string> ListAPISettings()
      {
         Dictionary<string, string> settings = new Dictionary<string, string>();
         settings.Add( "------- API Control --------", "---------------------------" );
         settings.Add( "api_Url", api_URL );
         settings.Add( "api_Version", api_Version );
         settings.Add( "api_UserAgent", api_UserAgent );
         settings.Add( "api_DataCenter", api_DataCenter );
         settings.Add( "api_xmlrpc_UseStringTag", api_xmlrpc_UseStringTag.ToString() );
         settings.Add( "api_xmlrpc_Indentation", api_xmlrpc_Indentation.ToString() );
         settings.Add( "api_xmlrpc_EnableCompression", api_xmlrpc_EnableCompression.ToString() );
         settings.Add( "----- Wrapper Defaults -----", "---------------------------" );
         settings.Add( "AccessType", default_AccessType.ToString() );
         settings.Add( "OutputType", default_OutputType.ToString() );
         settings.Add( "MethodType", default_MethodType.ToString() );
         settings.Add( "api_Timeout (milli-sec)", default_Timeout.ToString( "N0" ) );
         settings.Add( "api_SecureAccess", default_SecureAccess.ToString() );
         settings.Add( "EncodeRequest", default_EncodeRequest.ToString() );
         settings.Add( "Validate", default_Validate.ToString() );
         settings.Add( "CustomErrorMessages", default_CustomErrorMessages.ToString() );
         settings.Add( "------ Method Defaults -----", "---------------------------" );
         settings.Add( "apikey", default_apikey );
         settings.Add( "apikeys_expired", default_apikeys_expired.ToString() );
         settings.Add( "generateText_type", default_generateText_type.ToString() );
         settings.Add( "inlineCss_strip_css", default_inlineCss_strip_css.ToString() );
         //
         settings.Add( "listSubscribe_email_type", default_listSubscribe_email_type.ToString() );
         settings.Add( "listSubscribe_double_optin", default_listSubscribe_double_optin.ToString() );
         settings.Add( "listSubscribe_update_existing", default_listSubscribe_update_existing.ToString() );
         settings.Add( "listSubscribe_replace_interests", default_listSubscribe_replace_interests.ToString() );
         settings.Add( "listSubscribe_send_welcome", default_listSubscribe_send_welcome.ToString() );
         settings.Add( "listUnsubscribe_delete_member", default_listUnsubscribe_delete_member.ToString() );
         settings.Add( "listUnsubscribe_send_goodbye", default_listUnsubscribe_send_goodbye.ToString() );
         settings.Add( "listUnsubscribe_send_notify", default_listUnsubscribe_send_notify.ToString() );
         settings.Add( "listMembers_status", default_listMembers_status.ToString() );
         //
         settings.Add( "listMergeVarAdd_field_type", default_listMergeVarAdd_field_type.ToString() );
         settings.Add( "listMergeVarAdd_req", default_listMergeVarAdd_req.ToString() );
         settings.Add( "listMergeVarAdd_public", default_listMergeVarAdd_public.ToString() );
         settings.Add( "listMergeVarAdd_show", default_listMergeVarAdd_show.ToString() );
         //
         settings.Add( "campaignContent_for_archive", default_campaignContent_for_archive.ToString() );
         settings.Add( "campaignSendTest_send_type", default_campaignSendTest_send_type.ToString() );
         //
         settings.Add( "campaign_type", default_campaign_type.ToString() );
         settings.Add( "campaign_tracking_opens", default_campaign_tracking_opens.ToString() );
         settings.Add( "campaign_tracking_html_clicks", default_campaign_tracking_html_clicks.ToString() );
         settings.Add( "campaign_tracking_text_clicks", default_campaign_tracking_text_clicks.ToString() );
         settings.Add( "campaign_authenticate", default_campaign_authenticate.ToString() );
         settings.Add( "campaign_inline_css", default_campaign_inline_css.ToString() );
         settings.Add( "campaign_generate_text", default_campaign_generate_text.ToString() );
         settings.Add( "campaign_auto_footer", default_campaign_auto_footer.ToString() );
         settings.Add( "campaign_auto_tweet", default_campaign_auto_tweet.ToString() );
         settings.Add( "campaign_timewarp", default_campaign_timewarp.ToString() );
         settings.Add( "campaign_ecomm360", default_campaign_ecomm360.ToString() );
         // Rss options
         settings.Add( "campaign_rss_schedule", default_campaign_rss_schedule.ToString() );
         settings.Add( "campaign_rss_schedule_hour", default_campaign_rss_schedule_hour );
         settings.Add( "campaign_rss_schedule_weekday", default_campaign_rss_schedule_weekday.ToString() );
         settings.Add( "campaign_rss_schedule_monthday", default_campaign_rss_schedule_monthday );
         // A/B Split
         settings.Add( "campaign_AB_pick_winner", default_campaign_AB_pick_winner.ToString() );
         settings.Add( "campaign_AB_wait_units", default_campaign_AB_wait_units.ToString() );
         settings.Add( "campaign_AB_wait_time", default_campaign_AB_wait_time.ToString() );
         settings.Add( "campaign_AB_split_size", string.Format( "{0}%", default_campaign_AB_split_size ) );
         //
         settings.Add( "campaignShareReport_header_type", default_campaignShareReport_header_type.ToString() );
         settings.Add( "campaignShareReport_header_data", default_campaignShareReport_header_data.ToString() );
         settings.Add( "campaignShareReport_secure", default_campaignShareReport_secure.ToString() );
         settings.Add( "campaignShareReport_css_url", default_campaignShareReport_css_url.ToString() );

         // Webhooks ---------
         settings.Add( "listWebhook_actions_subscribe", default_listWebhook_actions_subscribe.ToString() );
         settings.Add( "listWebhook_actions_unsubscribe", default_listWebhook_actions_unsubscribe.ToString() );
         settings.Add( "listWebhook_actions_profile", default_listWebhook_actions_profile.ToString() );
         settings.Add( "listWebhook_actions_cleaned", default_listWebhook_actions_cleaned.ToString() );
         settings.Add( "listWebhook_actions_upemail", default_listWebhook_actions_upemail.ToString() );
         // ---------
         settings.Add( "listWebhook_sources_user", default_listWebhook_sources_user.ToString() );
         settings.Add( "listWebhook_sources_admin", default_listWebhook_sources_admin.ToString() );
         settings.Add( "listWebhook_sources_api", default_listWebhook_sources_api.ToString() );
         // ------------
         settings.Add( "----- Limit Defaults -----", "---------------------------" );
         // Lists
         settings.Add( "limit_listMembers", string.Format( "{0:N0} [max: {1:N0}]", default_limit_listMembers, max_listMembers ) );
         settings.Add( "limit_listAbuseReports", string.Format( "{0:N0} [max: {1:N0}]", default_limit_listAbuseReports, max_listAbuseReports ) );
         // Campaigns and Stats
         settings.Add( "limit_campaigns", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaigns, max_campaigns ) );
         //
         settings.Add( "limit_campaignAbuseReports", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignAbuseReports, max_campaignAbuseReports ) );
         settings.Add( "limit_campaignBounceMessages", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignBounceMessages, max_campaignBounceMessages ) );
         settings.Add( "limit_campaignEcommOrders", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignEcommOrders, max_campaignEcommOrders ) );
         settings.Add( "limit_campaignHardBounces", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignHardBounces, max_campaignHardBounces ) );
         settings.Add( "limit_campaignSoftBounces", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignSoftBounces, max_campaignSoftBounces ) );
         settings.Add( "limit_campaignUnsubscribes", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignUnsubscribes, max_campaignUnsubscribes ) );
         // AIM
         settings.Add( "limit_campaignClickDetailAIM", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignClickDetailAIM, max_campaignClickDetailAIM ) );
         settings.Add( "limit_campaignEmailStatsAIMAll", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignEmailStatsAIMAll, max_campaignEmailStatsAIMAll ) );
         settings.Add( "limit_campaignNotOpenedAIM", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignNotOpenedAIM, max_campaignNotOpenedAIM ) );
         settings.Add( "limit_campaignOpenedAIM", string.Format( "{0:N0} [max: {1:N0}]", default_limit_campaignOpenedAIM, max_campaignOpenedAIM ) );
         //
         return settings;
      }
      #endregion
   }
}
